<?php 
/**
 * 个人中心控制器
 * @author 杨帆
 */
class CenterController extends CommonController{
    /**
     * 默认显示
     */
    public function index(){
        //显示公用头部数据列表
        $this->commonShow();
        
        $uid = $_SESSION['uid'];
    
        //显示订单内容和图片
        $orderData = M('')->join('__order_bill__ AS ob JOIN __order_entry__ AS oe ON ob.oid=oe.order_bill_oid JOIN __goods__ as g ON oe.goods_gid=g.gid')->where("user_uid={$uid}")->all();
//      p($orderData);
        $this->assign('orderData',$orderData);
        
        //统计订单数
        $Count =K('OrderBill')->where("user_uid={$uid}")->count();
    //  p($Count);
        $this->assign('Count',$Count);
        
        $this->display(); 
    }
 }
 
 
 
 
 
 
 
 
 
 
 



 ?>